﻿using Fighter.Fights.Libraries;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Xml;

namespace TestFighterJoin
{
    
    
    /// <summary>
    ///This is a test class for FightJoinerTest and is intended
    ///to contain all FightJoinerTest Unit Tests
    ///</summary>
    [TestClass()]
    public class FightJoinerTest
    {


        private TestContext testContextInstance;
        private static FightJoiner fJoiner; 

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
    
        
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion

        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        [ClassInitialize()]
        public static void MyClassInitialize(TestContext testContext)
        {
            fJoiner = new FightJoiner();
        }

        [TestMethod()]
        public void TestLowKick1()
        {
            fJoiner.AddFight("",1, 13, 16, Gender.E_Male, 70, Belts.E_White, 7, "A");
            Assert.AreEqual("[fight:13][gender:M][age:18][series:III][weight:071,0]", fJoiner.KeyResult);
        }

        [TestMethod()]
        public void TestLowKick2()
        {
            fJoiner.AddFight("", 2, 13, 18, Gender.E_Male, 70, Belts.E_White, 16, "A");
            Assert.AreEqual("[fight:13][gender:M][age:18][series:III][weight:071,0]", fJoiner.KeyResult);
        }

        [TestMethod()]
        public void TestickLight1()
        {
            fJoiner.AddFight("", 3, 5, 18, Gender.E_Male, 70, Belts.E_Brown, 16, "A");
            Assert.AreEqual("[fight:05][gender:M][age:18][belt:1][weight:074,0]", fJoiner.KeyResult);
        }

        /// <summary>
        ///A test for AddFight
        ///</summary>
        //[TestMethod()]
        //public void AddFightTest()
        //{
        //    FightJoiner target = new FightJoiner(); // TODO: Initialize to an appropriate value
        //    int IDClub = 0; // TODO: Initialize to an appropriate value
        //    int IDAtlhete = 0; // TODO: Initialize to an appropriate value
        //    int IDfight = 0; // TODO: Initialize to an appropriate value
        //    int age = 0; // TODO: Initialize to an appropriate value
        //    string gender = string.Empty; // TODO: Initialize to an appropriate value
        //    double weight = 0F; // TODO: Initialize to an appropriate value
        //    Belts belt = Belts.E_White; // TODO: Initialize to an appropriate value
        //    int level = 0; // TODO: Initialize to an appropriate value
        //    string classes = string.Empty;
        //    target.AddFight(IDClub, IDAtlhete, IDfight, age, gender, weight, belt, level, classes);
        //    Assert.Inconclusive("A method that does not return a value cannot be verified.");
        //}

        /// <summary>
        ///A test for CreateKey
        ///</summary>
        //[TestMethod()]
        //[DeploymentItem("Fighter.dll")]
        //public void CreateKeyTest()
        //{
        //    FightJoiner_Accessor target = new FightJoiner_Accessor(); // TODO: Initialize to an appropriate value
        //    XmlNodeList xList = null; // TODO: Initialize to an appropriate value
        //    int age = 0; // TODO: Initialize to an appropriate value
        //    string gender = string.Empty; // TODO: Initialize to an appropriate value
        //    double weight = 0F; // TODO: Initialize to an appropriate value
        //    Belts belt = new Belts(); // TODO: Initialize to an appropriate value
        //    string expected = string.Empty; // TODO: Initialize to an appropriate value
        //    string actual;
        //    actual = target.CreateKey(xList, age, gender, weight, belt);
        //    Assert.AreEqual(expected, actual);
        //    Assert.Inconclusive("Verify the correctness of this test method.");
        //}
    }
}
